<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE html>
<html>

   <!-- 提前两分钟让 session失效 -->
   <% int iMaxInactiveInterval = request.getSession(false).getMaxInactiveInterval()  - 120 ;  %>
   <% String  path = request.getContextPath() ; %>

<script type="text/javascript">
  ID = window.setTimeout("TimeOut();", <%= iMaxInactiveInterval * 1000 %>);
  function TimeOut(){
	  var msg = "身份过期，重新登录！";
	  if(confirm(msg)){
		  
	   } 
	   window.location.href='<%=path %>/login/logout';
  }
</script>




  